package com.googlecode.microanalyst.designer.model.commands;

import com.googlecode.microanalyst.designer.model.AnalysisConnectionBendpoint;

public class DeleteBendpointCommand extends BendpointCommand {

	private AnalysisConnectionBendpoint bendpoint;

	public void execute() {
		bendpoint = getConnection().getBendpoints().get(getIndex());
		getConnection().removeBendpoint(getIndex());
		super.execute();
	}

	public void undo() {
		super.undo();
		getConnection().insertBendpoint(getIndex(), bendpoint);
	}

}
